/**
 * Project Name:JavaBaseReview
 * Package Name:com.xuwei.base.enumeration
 * author:David
 * Date:2016年6月7日上午9:43:13
 * Copyright (c) 2016, xw123box@126.com All Rights Reserved.
 *
 */
package com.xuwei.base.enumeration;

/**
 * @author David
 * @since 2016年6月7日 上午9:43:13
 * @version 
 * @since JDK 1.6
 */
public class Demo4 {
	
	public static void main(String[] args) {
//		System.out.println(TrafficLamp.GREEN);
//		System.out.println(TrafficLamp.GREEN.nextLamp().name());
		
		System.out.println(WeekDay2.MON);
	}

}

enum TrafficLamp{
	RED(80){
		@Override
		public TrafficLamp nextLamp() {
			return GREEN;
		}
	},
	GREEN(20){
		@Override
		public TrafficLamp nextLamp() {
			return YELLOW;
		}
	},
	YELLOW(5){
		@Override
		public TrafficLamp nextLamp() {
			return RED;
		}
	};
	
	public abstract TrafficLamp nextLamp();
	private int time;
	private TrafficLamp(int time){this.time = time;}
}

enum WeekDay2{
	SUN(1),MON(),TUE,WED,THU,FRI,SAT;
	/**
	 * 
	 */
	private WeekDay2() {
	}
	
	private WeekDay2(int day){
		System.out.println("the "+day+"st day of week.");
	}
}



